;(function(){
	
	function Model(){
		this.table_name="";
		this.sechma="";
		
		this.db=null;
	}
	
	Model.prototype={
		constructor:Model,
		insert:function(data){
			this.db.transaction()
				.add(this.table_name,data)
				.commit();
		},
		insertAll:function(data){
			var db = this.db.transaction();
			for(var i in data){
				db.add(this.table_name,data[i]);
			}
			db.commit();
		},
		update:function(where,data){
			this.db.transaction()
				.update(this.table_name,data,where)
				.commit();
		},
		remove:function(where){
			this.db.transaction()
				.remove(this.table_name,where)
				.commit();
		},
		select:function(where){
			this.db.transaction()
				.select(this.table_name,where)
				.commit();
		}
	};
	
	window.Crawler=window.Crawler||{};
	Crawler.Model=Model;
})();
